<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/basicTemplate.xhtml">
			
<ui:define name="content">
<f:view>
	<h:dataTable value="#{viewCandidatesBean.candidatesById}" var="c"
		styleClass="order-table" headerClass="order-table-header"
		rowClasses="order-table-odd-row,order-table-even-row">

		<h:column>
			<f:facet name="header">
    				Name
    			</f:facet>
    			 <h:outputLink styleClass="smalltext"> 	#{c.name}</h:outputLink>
    		</h:column>

		<h:column>
			<f:facet name="header">
    				Tests
				</f:facet>
			<h:dataTable value="#{c.interviews}" var="test"
				styleClass="inner-table"  border="0" >
				<h:column >#{test.template.title}</h:column>
			</h:dataTable>
		</h:column>

		<h:column>
			<f:facet name="header">
    				Info Candidate
				</f:facet>
			<h:dataTable value="#{c.interviews}" var="test"
				styleClass="inner-table"  border="0" >
				<h:column>
					<h:form>
						
					</h:form>
				</h:column>
			</h:dataTable>
		</h:column>

		<h:column>
			<f:facet name="header">
    				Confirmed
				</f:facet>
			<h:dataTable value="#{c.interviews}" var="test"
				styleClass="inner-table"  border="0" >
				<h:column >
    		<div align="center">#{test.accepted}</div></h:column>
			</h:dataTable>
		</h:column>

	</h:dataTable>
	<h:form id="form">
		<h:outputText value="Test1"></h:outputText>
		<h:commandButton id="generateTest" value="Generate test" onclick="myFunction()"></h:commandButton>
		<h:commandButton id="startTest" value="Start test" disabled="true" ></h:commandButton>
		<script type="text/javascript">
			function myFunction()
			{
			document.getElementById("form:generateTest").disabled=true;
			document.getElementById("form:startTest").disabled=false;
			}
		</script>
	   	 	
	</h:form>
</f:view>
</ui:define>
</ui:composition>
</html>